import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Endstart
 * Date: 2021-05-09
 * Time: 11:45
 */
public class DFA {
    int start;
    Map<Pair<Integer, Character>, Integer> ts;

    Set<Integer> fs;

//    Result test(DFA dfa, List<Pair<String, Boolean>> suite) {
//        for (Pair<String, Boolean> input : suite) {
//            String inputTmp = input.fst();
//
//        }
//    }
//
//    private boolean testHelper(String input, int index) {
//        return true
//    }
//
//    private Set<Character> getLinked(Integer integer) {
//        for ()
//    }

    Result test(DFA dfa, List<Pair<String, Boolean>> suite) {
        Result result = new Result();
        for (int i = 0; i < suite.size(); i++) {
            Pair<String, Boolean> pair = suite.get(i);
            String input = pair.fst();
            int state = dfa.start;
            for (int j = 0; j < input.length(); j++) {
                result.sCov.add(state);
                char c = input.charAt(j);
                if (dfa.ts.containsKey(new Pair<>(state,c))) {
                    result.tCov.add(new Pair<>(state,c));
                    state = dfa.ts.get(new Pair<>(state,c));
                }
            }
            result.sCov.add(state);
            boolean isAccept = dfa.fs.contains(state);
            if (isAccept != pair.snd()) {
                result.failures.add(input);
            }
        }
        return result;
    }
}

class Result {
    Set<String> failures;
    Set<Integer> sCov;
    Set<Pair<Integer, Character>> tCov;

}
